<!doctype html>
<html lang="zh-CN">
<head>

    <meta charset="utf-8">
    <meta name="generator" content="Hugo 0.74.1" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Android 记录在macOS上使用 NDK20 编译ffmpeg4.2.2的过程 | caijinglong的博客</title>
    <meta property="og:title" content="Android 记录在macOS上使用 NDK20 编译ffmpeg4.2.2的过程 - caijinglong的博客">
    <meta property="og:type" content="article">
        
    <meta property="article:published_time" content="2020-01-07T11:50:07&#43;08:00">
        
        
    <meta property="article:modified_time" content="2020-01-07T11:50:07&#43;08:00">
        
    <meta name="Keywords" content="golang,go语言,flutter,caijinglong,java,android,博客,项目管理,python,软件架构,公众号,小程序">
    <meta name="description" content="Android 记录在macOS上使用 NDK20 编译ffmpeg4.2.2的过程">
        
    <meta name="author" content="caijinglong">
    <meta property="og:url" content="http://www.kikt.top/posts/android/ffmpeg/compile-with-ndk20/">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">

    <link rel="stylesheet" href="/css/normalize.css">
    
        <link rel="stylesheet" href="/css/prism.css">
    
    <link rel="stylesheet" href="/css/style.css">
    <script type="text/javascript" src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>

    

   
    <script>
        (function(){
            var bp = document.createElement('script');
            var curProtocol = window.location.protocol.split(':')[0];
            if (curProtocol === 'https') {
                bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
            }
            else {
                bp.src = 'http://push.zhanzhang.baidu.com/push.js';
            }
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(bp, s);
        })();
    </script>

    
    
</head>

<body>
<header id="header" class="clearfix">
    <div class="container">
        <div class="col-group">
            <div class="site-name ">
                
                    <a id="logo" href="http://www.kikt.top">
                        caijinglong的博客
                    </a>
                
                <p class="description">Android/Flutter开发者，对于golang/python/ios/java 均有所了解</p>
            </div>
            <div>
                <nav id="nav-menu" class="clearfix">
                    <a class="" href="http://www.kikt.top">首页</a>
                    
                    <a  href="http://www.kikt.top/archives/" title="归档">归档</a>
                    
                    <a  href="http://www.kikt.top/contact/" title="接单">接单</a>
                    
                    <a  href="http://www.kikt.top/about/" title="关于">关于</a>
                    
                </nav>
            </div>
        </div>
    </div>
</header>


<div id="body">
    <div class="container">
        <div class="col-group">

            <div class="col-8" id="main">
                <div class="res-cons">
                    <article class="post">
                        <header>
                            <h1 class="post-title">Android 记录在macOS上使用 NDK20 编译ffmpeg4.2.2的过程</h1>
                        </header>
                        <date class="post-meta meta-date">
                            2020年1月7日
                        </date>
                        
                        <div class="post-meta meta-category">
                            |
                            
                                <a href="http://www.kikt.top/categories/android">android</a>
                            
                        </div>
                        
                        
                        <div class="post-meta">
                            <span id="busuanzi_container_page_pv">|<span id="busuanzi_value_page_pv"></span><span> 阅读</span></span>
                        </div>
                        
                        <div class="post-content">
                            <ul>
<li><a href="#%e5%89%8d%e8%a8%80">前言</a></li>
<li><a href="#%e7%bc%96%e8%af%91%e8%84%9a%e6%9c%ac">编译脚本</a></li>
<li><a href="#android-%e4%b8%ad%e5%bc%95%e5%85%a5">android 中引入</a></li>
<li><a href="#%e5%90%8e%e8%ae%b0">后记</a></li>
</ul>
<h2 id="前言">前言</h2>
<p>ijkplayer 的 ffmpeg 是旧版本的, ndk 也是旧的, 程序员爱折腾, 所以想用最新的 ndk 编译最新的 ffmpeg, 当前就是 ndk20+ffmpeg4.2.2 了</p>
<p>第一步自然是搜索有没有现成的, 运气不错, 找到了大佬的示例</p>
<p>本篇参考了 <a href="https://juejin.im/post/5d831333f265da03c61e8a28">https://juejin.im/post/5d831333f265da03c61e8a28</a> 的内容, 但因为我是 macOS, 所以进行了一些修改
包括有的东西设置后发现没生效, 在实际打包的时候会报类似下面的这种错误</p>
<pre><code class="language-log" data-lang="log">ld: warning: building for macOS, but linking in object file (libswresample/libswresample.a(resample.o)) built for free standing
</code></pre><p>所以我根据实际的报错内容进行了修改</p>
<h2 id="编译脚本">编译脚本</h2>
<p>这里只需要修改你的 NDK 为你本地的 NDK 目录即可</p>
<p>最新的代码在这里: <a href="https://gist.github.com/CaiJingLong/feefa3b63e5b94f5ad1807825861e0e0">https://gist.github.com/CaiJingLong/feefa3b63e5b94f5ad1807825861e0e0</a> gist.github.com 需要自备梯子</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#75715e">#!/bin/bash
</span><span style="color:#75715e"></span>
NDK<span style="color:#f92672">=</span>/Volumes/Evo512/sdk/android-ndk-r20
TOOLCHAIN<span style="color:#f92672">=</span>$NDK/toolchains/llvm/prebuilt/darwin-x86_64
API<span style="color:#f92672">=</span><span style="color:#ae81ff">21</span>

<span style="color:#66d9ef">function</span> build_android
<span style="color:#f92672">{</span>
echo <span style="color:#e6db74">&#34;Compiling FFmpeg for </span>$CPU<span style="color:#e6db74">&#34;</span>
./configure <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --prefix<span style="color:#f92672">=</span>$PREFIX <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --libdir<span style="color:#f92672">=</span>$LIB_DIR <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --enable-shared <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --disable-static <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --enable-jni <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --disable-doc <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --disable-symver <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --disable-programs <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --target-os<span style="color:#f92672">=</span>android <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --arch<span style="color:#f92672">=</span>$ARCH <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --cpu<span style="color:#f92672">=</span>$CPU <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --cc<span style="color:#f92672">=</span>$CC <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --cxx<span style="color:#f92672">=</span>$CXX <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --enable-cross-compile <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --sysroot<span style="color:#f92672">=</span>$SYSROOT <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --extra-cflags<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;-Os -fpic </span>$OPTIMIZE_CFLAGS<span style="color:#e6db74">&#34;</span> <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --extra-ldflags<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$ADDI_LDFLAGS<span style="color:#e6db74">&#34;</span> <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    --disable-asm <span style="color:#ae81ff">\
</span><span style="color:#ae81ff"></span>    $COMMON_FF_CFG_FLAGS
make clean
make -j8
make install
echo <span style="color:#e6db74">&#34;The Compilation of FFmpeg for </span>$CPU<span style="color:#e6db74"> is completed&#34;</span>
<span style="color:#f92672">}</span>

<span style="color:#75715e"># # armv8-a</span>
<span style="color:#75715e"># source &#34;config-env.sh&#34;</span>
<span style="color:#75715e"># OUTPUT_FOLDER=&#34;arm64-v8a&#34;</span>
<span style="color:#75715e"># ARCH=arm64</span>
<span style="color:#75715e"># CPU=&#34;armv8-a&#34;</span>
<span style="color:#75715e"># TOOL_CPU_NAME=aarch64</span>
<span style="color:#75715e"># TOOL_PREFIX=&#34;$TOOLCHAIN/bin/$TOOL_CPU_NAME-linux-android&#34;</span>

<span style="color:#75715e"># CC=&#34;$TOOL_PREFIX$API-clang&#34;</span>
<span style="color:#75715e"># CXX=&#34;$TOOL_PREFIX$API-clang++&#34;</span>
<span style="color:#75715e"># SYSROOT=&#34;$NDK/toolchains/llvm/prebuilt/darwin-x86_64/sysroot&#34;</span>
<span style="color:#75715e"># PREFIX=&#34;${PWD}/android/$OUTPUT_FOLDER&#34;</span>
<span style="color:#75715e"># LIB_DIR=&#34;${PWD}/android/libs/$OUTPUT_FOLDER&#34;</span>
<span style="color:#75715e"># OPTIMIZE_CFLAGS=&#34;-march=$CPU&#34;</span>
<span style="color:#75715e"># build_android</span>

<span style="color:#75715e"># # armv7-a</span>
<span style="color:#75715e"># source &#34;config-env.sh&#34;</span>
<span style="color:#75715e"># OUTPUT_FOLDER=&#34;armeabi-v7a&#34;</span>
<span style="color:#75715e"># ARCH=&#34;arm&#34;</span>
<span style="color:#75715e"># CPU=&#34;armv7-a&#34;</span>
<span style="color:#75715e"># TOOL_CPU_NAME=armv7a</span>
<span style="color:#75715e"># TOOL_PREFIX=&#34;$TOOLCHAIN/bin/arm-linux-androideabi&#34;</span>

<span style="color:#75715e"># CC=&#34;$TOOLCHAIN/bin/armv7a-linux-androideabi$API-clang&#34;</span>
<span style="color:#75715e"># CXX=&#34;$TOOLCHAIN/bin/armv7a-linux-androideabi$API-clang++&#34;</span>
<span style="color:#75715e"># SYSROOT=&#34;$NDK/toolchains/llvm/prebuilt/darwin-x86_64/sysroot&#34;</span>
<span style="color:#75715e"># PREFIX=&#34;${PWD}/android/$OUTPUT_FOLDER&#34;</span>
<span style="color:#75715e"># LIB_DIR=&#34;${PWD}/android/libs/$OUTPUT_FOLDER&#34;</span>
<span style="color:#75715e"># OPTIMIZE_CFLAGS=&#34;-march=$CPU&#34;</span>
<span style="color:#75715e"># build_android</span>

<span style="color:#75715e"># x86</span>
source <span style="color:#e6db74">&#34;config-env.sh&#34;</span>
OUTPUT_FOLDER<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;x86&#34;</span>
ARCH<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;x86&#34;</span>
CPU<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;x86&#34;</span>
TOOL_CPU_NAME<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;i686&#34;</span>
TOOL_PREFIX<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$TOOLCHAIN<span style="color:#e6db74">/bin/</span><span style="color:#e6db74">${</span>TOOL_CPU_NAME<span style="color:#e6db74">}</span><span style="color:#e6db74">-linux-android&#34;</span>

CC<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$TOOL_PREFIX$API<span style="color:#e6db74">-clang&#34;</span>
CXX<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$TOOL_PREFIX$API<span style="color:#e6db74">-clang++&#34;</span>
SYSROOT<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$NDK<span style="color:#e6db74">/toolchains/llvm/prebuilt/darwin-x86_64/sysroot&#34;</span>
PREFIX<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>PWD<span style="color:#e6db74">}</span><span style="color:#e6db74">/android/</span>$OUTPUT_FOLDER<span style="color:#e6db74">&#34;</span>
LIB_DIR<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span><span style="color:#e6db74">${</span>PWD<span style="color:#e6db74">}</span><span style="color:#e6db74">/android/libs/</span>$OUTPUT_FOLDER<span style="color:#e6db74">&#34;</span>
OPTIMIZE_CFLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;-march=i686 -mtune=intel -mssse3 -mfpmath=sse -m32&#34;</span>
build_android

<span style="color:#75715e"># x86_64</span>
<span style="color:#75715e"># source &#34;config-env.sh&#34;</span>
<span style="color:#75715e"># OUTPUT_FOLDER=&#34;x86_64&#34;</span>
<span style="color:#75715e"># ARCH=&#34;x86_64&#34;</span>
<span style="color:#75715e"># CPU=&#34;x86-64&#34;</span>
<span style="color:#75715e"># TOOL_CPU_NAME=&#34;x86_64&#34;</span>
<span style="color:#75715e"># TOOL_PREFIX=&#34;$TOOLCHAIN/bin/${TOOL_CPU_NAME}-linux-android&#34;</span>

<span style="color:#75715e"># CC=&#34;$TOOL_PREFIX$API-clang&#34;</span>
<span style="color:#75715e"># CXX=&#34;$TOOL_PREFIX$API-clang++&#34;</span>
<span style="color:#75715e"># SYSROOT=&#34;$NDK/toolchains/llvm/prebuilt/darwin-x86_64/sysroot&#34;</span>
<span style="color:#75715e"># PREFIX=&#34;${PWD}/android/$OUTPUT_FOLDER&#34;</span>
<span style="color:#75715e"># LIB_DIR=&#34;${PWD}/android/libs/$OUTPUT_FOLDER&#34;</span>
<span style="color:#75715e"># OPTIMIZE_CFLAGS=&#34;-march=$CPU&#34;</span>
<span style="color:#75715e"># build_android</span>
</code></pre></div><p>根据自己需要的 cpu, 放开对应的注释即可</p>
<hr>
<p>config-env.sh</p>
<p>这个环境是 ijkplayer 的 ffmpeg 配置</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash"><span style="color:#75715e">#! /usr/bin/env bash
</span><span style="color:#75715e"></span>
<span style="color:#75715e"># shell/config.sh</span>
<span style="color:#75715e"># 这个来自ijkplayer的ffmpeg配置, 会在上面的build脚本中被引入</span>

<span style="color:#75715e">#--------------------</span>
<span style="color:#75715e"># Standard options:</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --prefix=PREFIX&#34;</span>

<span style="color:#75715e"># Licensing options:</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-gpl&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-version3&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-nonfree&#34;</span>

<span style="color:#75715e"># Configuration options:</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-static&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-shared&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-small&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-runtime-cpudetect&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-gray&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-swscale-alpha&#34;</span>

<span style="color:#75715e"># Program options:</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-programs&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-ffmpeg&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-ffplay&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-ffprobe&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-ffserver&#34;</span>

<span style="color:#75715e"># Documentation options:</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-doc&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-htmlpages&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-manpages&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-podpages&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-txtpages&#34;</span>

<span style="color:#75715e"># Component options:</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-avdevice&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-avcodec&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-avformat&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-avutil&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-swresample&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-swscale&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-postproc&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-avfilter&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-avresample&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-pthreads&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-w32threads&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-os2threads&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-network&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-dct&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-dwt&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-lsp&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-lzo&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-mdct&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-rdft&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-fft&#34;</span>

<span style="color:#75715e"># Hardware accelerators:</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-d3d11va&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-dxva2&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-vaapi&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-vda&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-vdpau&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-videotoolbox&#34;</span>

<span style="color:#75715e"># Individual component options:</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-everything&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-encoders&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-encoder=png&#34;</span>

<span style="color:#75715e"># ./configure --list-decoders</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-decoders&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=aac&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=aac_latm&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=flv&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=h264&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=mp3*&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=vp6f&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=flac&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=hevc&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=vp8&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=vp9&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=h263&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=h263i&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=h263p&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=mpeg4&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-decoder=mjpeg&#34;</span>

export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-hwaccels&#34;</span>

<span style="color:#75715e"># ./configure --list-muxers</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-muxers&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-muxer=mp4&#34;</span>

<span style="color:#75715e"># ./configure --list-demuxers</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-demuxers&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=aac&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=concat&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=data&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=flv&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=hls&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=live_flv&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=mov&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=mp3&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=mpegps&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=mpegts&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=mpegvideo&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=flac&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=hevc&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=webm_dash_manifest&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=mpeg4&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=rtsp&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=mjpeg&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-demuxer=avi&#34;</span>

<span style="color:#75715e"># ./configure --list-parsers</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-parsers&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-parser=aac&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-parser=aac_latm&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-parser=h264&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-parser=flac&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-parser=hevc&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-parser=mpeg4&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-parser=mpeg4video&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-parser=mpegvideo&#34;</span>

<span style="color:#75715e"># ./configure --list-bsf</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-bsfs&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bsf=chomp&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bsf=dca_core&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bsf=dump_extradata&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bsf=hevc_mp4toannexb&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bsf=imx_dump_header&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bsf=mjpeg2jpeg&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bsf=mjpega_dump_header&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bsf=mov2textsub&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bsf=mp3_header_decompress&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bsf=mpeg4_unpack_bframes&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bsf=noise&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bsf=remove_extradata&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bsf=text2movsub&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bsf=vp9_superframe&#34;</span>

<span style="color:#75715e"># ./configure --list-protocols</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-protocols&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-protocol=async&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-protocol=bluray&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-protocol=concat&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-protocol=crypto&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-protocol=ffrtmpcrypt&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-protocol=ffrtmphttp&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-protocol=gopher&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-protocol=icecast&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-protocol=librtmp*&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-protocol=libssh&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-protocol=md5&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-protocol=mmsh&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-protocol=mmst&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-protocol=rtmp*&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-protocol=rtmp&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-protocol=rtmpt&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-protocol=rtp&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-protocol=sctp&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --enable-protocol=srtp&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-protocol=subfile&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-protocol=unix&#34;</span>

#
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-devices&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-filters&#34;</span>

<span style="color:#75715e"># External library support:</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-iconv&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-audiotoolbox&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-videotoolbox&#34;</span>

<span style="color:#75715e"># ...</span>

<span style="color:#75715e"># Advanced options (experts only):</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --cross-prefix=${FF_CROSS_PREFIX}-&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-cross-compile&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --sysroot=PATH&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --sysinclude=PATH&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --target-os=TAGET_OS&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --target-exec=CMD&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --target-path=DIR&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --toolchain=NAME&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --nm=NM&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --ar=AR&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --as=AS&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --yasmexe=EXE&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --cc=CC&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --cxx=CXX&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --dep-cc=DEPCC&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --ld=LD&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --host-cc=HOSTCC&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --host-cflags=HCFLAGS&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --host-cppflags=HCPPFLAGS&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --host-ld=HOSTLD&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --host-ldflags=HLDFLAGS&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --host-libs=HLIBS&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --host-os=OS&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --extra-cflags=ECFLAGS&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --extra-cxxflags=ECFLAGS&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --extra-ldflags=ELDFLAGS&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --extra-libs=ELIBS&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --extra-version=STRING&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --optflags=OPTFLAGS&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --build-suffix=SUFFIX&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --malloc-prefix=PREFIX&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --progs-suffix=SUFFIX&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --arch=ARCH&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --cpu=CPU&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-pic&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-sram&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-thumb&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-symver&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-hardcoded-tables&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-safe-bitstream-reader&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-memalign-hack&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-lto&#34;</span>

<span style="color:#75715e"># Optimization options (experts only):</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-asm&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-altivec&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-amd3dnow&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-amd3dnowext&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-mmx&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-mmxext&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-sse&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-sse2&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-sse3&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-ssse3&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-sse4&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-sse42&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-avx&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-fma4&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-armv5te&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-armv6&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-armv6t2&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-vfp&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-neon&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-vis&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-inline-asm&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-yasm&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-mips32r2&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-mipsdspr1&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-mipsdspr2&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-mipsfpu&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-fast-unaligned&#34;</span>

<span style="color:#75715e"># Developer options (useful when working on FFmpeg itself):</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-coverage&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-debug&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-debug=LEVEL&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-optimizations&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-extra-warnings&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-stripping&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --assert-level=level&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-memory-poisoning&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --valgrind=VALGRIND&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-ftrapv&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --samples=PATH&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-xmm-clobber-test&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-random&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-random&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --enable-random=LIST&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --disable-random=LIST&#34;</span>
<span style="color:#75715e"># export COMMON_FF_CFG_FLAGS=&#34;$COMMON_FF_CFG_FLAGS --random-seed=VALUE&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-linux-perf&#34;</span>
export COMMON_FF_CFG_FLAGS<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;</span>$COMMON_FF_CFG_FLAGS<span style="color:#e6db74"> --disable-bzlib&#34;</span>
</code></pre></div><p>修改脚本的执行权限:</p>
<p><code>$ chmod +x build_android.sh</code></p>
<p><code>$ ./build_android.sh</code></p>
<p>接着运行就可以了</p>
<p><img src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&amp;path=%2F20200107170946.png&amp;versionDescriptor%5BversionOptions%5D=0&amp;versionDescriptor%5BversionType%5D=0&amp;resolveLfs=true&amp;%24format=octetStream&amp;api-version=5.0" alt="20200107170946.png"></p>
<p>pkg-config 是自动导出的内容, 不想要就删掉即可</p>
<hr>
<p>ijkplayer 里的 ffmpeg 应该是打包成静态库, 然后通过合并等操作来变成一个 so 的, 这里就没拆开</p>
<h2 id="android-中引入">android 中引入</h2>
<p>有动态库, 理论上就可以在项目里跑了, 我们试试自己引入这些 so 和代码, 然后通过项目调用一下</p>
<p>复制文件到项目里 <code>$ cp -r android/libs/* myproject/libs</code></p>
<p>完整 gradle 配置如下:</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-groovy" data-lang="groovy">apply plugin: <span style="color:#e6db74">&#39;com.android.application&#39;</span>

apply plugin: <span style="color:#e6db74">&#39;kotlin-android&#39;</span>

apply plugin: <span style="color:#e6db74">&#39;kotlin-android-extensions&#39;</span>

android <span style="color:#f92672">{</span>
    compileSdkVersion <span style="color:#ae81ff">29</span>
    buildToolsVersion <span style="color:#e6db74">&#34;29.0.2&#34;</span>
    defaultConfig <span style="color:#f92672">{</span>
        applicationId <span style="color:#e6db74">&#34;top.kikt.ffmpeg_sdl_example&#34;</span>
        minSdkVersion <span style="color:#ae81ff">21</span>
        targetSdkVersion <span style="color:#ae81ff">29</span>
        versionCode <span style="color:#ae81ff">1</span>
        versionName <span style="color:#e6db74">&#34;1.0&#34;</span>
        testInstrumentationRunner <span style="color:#e6db74">&#34;androidx.test.runner.AndroidJUnitRunner&#34;</span>
        externalNativeBuild <span style="color:#f92672">{</span>
            cmake <span style="color:#f92672">{</span>
                cppFlags <span style="color:#e6db74">&#34;&#34;</span> <span style="color:#75715e">// cpp编译时的参数配置
</span><span style="color:#75715e"></span>            <span style="color:#f92672">}</span>
        <span style="color:#f92672">}</span>
        ndk <span style="color:#f92672">{</span>
            abiFilters <span style="color:#e6db74">&#39;arm64-v8a&#39;</span><span style="color:#f92672">,</span> <span style="color:#e6db74">&#39;armeabi-v7a&#39;</span><span style="color:#f92672">,</span> <span style="color:#e6db74">&#39;x86&#39;</span><span style="color:#f92672">,</span> <span style="color:#e6db74">&#39;x86_64&#39;</span> <span style="color:#75715e">// cpu类型
</span><span style="color:#75715e"></span>        <span style="color:#f92672">}</span>
    <span style="color:#f92672">}</span>
    buildTypes <span style="color:#f92672">{</span>
        release <span style="color:#f92672">{</span>
            minifyEnabled <span style="color:#66d9ef">false</span>
            proguardFiles <span style="color:#a6e22e">getDefaultProguardFile</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#39;proguard-android-optimize.txt&#39;</span><span style="color:#f92672">),</span> <span style="color:#e6db74">&#39;proguard-rules.pro&#39;</span>
        <span style="color:#f92672">}</span>
    <span style="color:#f92672">}</span>
    externalNativeBuild <span style="color:#f92672">{</span>
        cmake <span style="color:#f92672">{</span>
            path <span style="color:#e6db74">&#34;src/main/cpp/CMakeLists.txt&#34;</span> <span style="color:#75715e">// cmake 文件配置
</span><span style="color:#75715e"></span>            version <span style="color:#e6db74">&#34;3.10.2&#34;</span>
        <span style="color:#f92672">}</span>
    <span style="color:#f92672">}</span>
    compileOptions <span style="color:#f92672">{</span>
        sourceCompatibility <span style="color:#f92672">=</span> <span style="color:#ae81ff">1.8</span>
        targetCompatibility <span style="color:#f92672">=</span> <span style="color:#ae81ff">1.8</span>
    <span style="color:#f92672">}</span>

    sourceSets <span style="color:#f92672">{</span>
        main <span style="color:#f92672">{</span>
            jniLibs<span style="color:#f92672">.</span><span style="color:#a6e22e">srcDirs</span> <span style="color:#f92672">=</span> <span style="color:#f92672">[</span><span style="color:#e6db74">&#39;libs&#39;</span><span style="color:#f92672">]</span> <span style="color:#75715e">// so库的父目录指定
</span><span style="color:#75715e"></span>        <span style="color:#f92672">}</span>
    <span style="color:#f92672">}</span>
<span style="color:#f92672">}</span>

dependencies <span style="color:#f92672">{</span>
    implementation <span style="color:#a6e22e">fileTree</span><span style="color:#f92672">(</span>dir: <span style="color:#e6db74">&#39;libs&#39;</span><span style="color:#f92672">,</span> include: <span style="color:#f92672">[</span><span style="color:#e6db74">&#39;*.jar&#39;</span><span style="color:#f92672">])</span>
    implementation <span style="color:#e6db74">&#34;org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version&#34;</span>
    implementation <span style="color:#e6db74">&#39;androidx.appcompat:appcompat:1.1.0&#39;</span>
    implementation <span style="color:#e6db74">&#39;androidx.core:core-ktx:1.1.0&#39;</span>
    implementation <span style="color:#e6db74">&#39;androidx.constraintlayout:constraintlayout:1.1.3&#39;</span>
    testImplementation <span style="color:#e6db74">&#39;junit:junit:4.12&#39;</span>
    androidTestImplementation <span style="color:#e6db74">&#39;androidx.test.ext:junit:1.1.1&#39;</span>
    androidTestImplementation <span style="color:#e6db74">&#39;androidx.test.espresso:espresso-core:3.2.0&#39;</span>
<span style="color:#f92672">}</span>

</code></pre></div><div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">cmake_minimum_required<span style="color:#f92672">(</span>VERSION 3.4.1<span style="color:#f92672">)</span> <span style="color:#75715e"># cmake版本</span>

include_directories<span style="color:#f92672">(</span>include<span style="color:#f92672">)</span>

add_library<span style="color:#f92672">(</span>
        ffmpeg-bridge <span style="color:#75715e"># 自己库的名称</span>

        SHARED <span style="color:#75715e"># 库的类型, 静态/动态</span>

        ffmpeg-bridge.cpp<span style="color:#f92672">)</span> <span style="color:#75715e"># 库的源码</span>


file<span style="color:#f92672">(</span>GLOB FFMPEG_LIBS ../../../libs/<span style="color:#e6db74">${</span>CMAKE_ANDROID_ARCH_ABI<span style="color:#e6db74">}</span>/*.so<span style="color:#f92672">)</span> <span style="color:#75715e"># 这里是找到对应的CPU</span>
message<span style="color:#f92672">(</span><span style="color:#e6db74">&#34;ffmpeg libs :  </span><span style="color:#e6db74">${</span>FFMPEG_LIBS<span style="color:#e6db74">}</span><span style="color:#e6db74">&#34;</span><span style="color:#f92672">)</span> <span style="color:#75715e"># app/.cxx/cmake/debug/arm64-v8a/build_output.txt 这里可以看到日志</span>

find_library<span style="color:#f92672">(</span>
        log-lib
        log<span style="color:#f92672">)</span>

target_link_libraries<span style="color:#f92672">(</span> <span style="color:#75715e"># Specifies the target library.</span>
        ffmpeg-bridge
        <span style="color:#e6db74">${</span>log-lib<span style="color:#e6db74">}</span>
        <span style="color:#e6db74">${</span>FFMPEG_LIBS<span style="color:#e6db74">}</span>
        <span style="color:#f92672">)</span>
</code></pre></div><p>ffmpeg-bridge.cpp:</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-cpp" data-lang="cpp"><span style="color:#75715e">#include</span> <span style="color:#75715e">&lt;jni.h&gt;</span><span style="color:#75715e">
</span><span style="color:#75715e">#include</span> <span style="color:#75715e">&lt;string&gt;</span><span style="color:#75715e">
</span><span style="color:#75715e">#include</span> <span style="color:#75715e">&lt;android/log.h&gt;</span><span style="color:#75715e">
</span><span style="color:#75715e"></span>
<span style="color:#75715e">#ifdef __cplusplus
</span><span style="color:#75715e">#if      __cplusplus
</span><span style="color:#75715e"></span><span style="color:#66d9ef">extern</span> <span style="color:#e6db74">&#34;C&#34;</span> {
<span style="color:#75715e">#endif
</span><span style="color:#75715e">#endif
</span><span style="color:#75715e">#include</span> <span style="color:#75715e">&lt;libavutil/avutil.h&gt;</span><span style="color:#75715e">
</span><span style="color:#75715e">#include</span> <span style="color:#75715e">&lt;libavformat/avformat.h&gt;</span><span style="color:#75715e">
</span><span style="color:#75715e">#ifdef __cplusplus
</span><span style="color:#75715e">#if      __cplusplus
</span><span style="color:#75715e"></span>}
<span style="color:#75715e">#endif
</span><span style="color:#75715e">#endif
</span><span style="color:#75715e"></span>
<span style="color:#66d9ef">extern</span> <span style="color:#e6db74">&#34;C&#34;</span> <span style="color:#66d9ef">void</span> logToAndroid(<span style="color:#66d9ef">void</span> <span style="color:#f92672">*</span>ptr, <span style="color:#66d9ef">int</span> level, <span style="color:#66d9ef">const</span> <span style="color:#66d9ef">char</span> <span style="color:#f92672">*</span>fmt, va_list vl) {
    <span style="color:#66d9ef">if</span> (level <span style="color:#f92672">==</span> AV_LOG_INFO) {
        __android_log_vprint(ANDROID_LOG_INFO, <span style="color:#e6db74">&#34;ffmpeg&#34;</span>, fmt, vl);
    } <span style="color:#66d9ef">else</span> <span style="color:#a6e22e">if</span> (level <span style="color:#f92672">==</span> AV_LOG_DEBUG) {
        __android_log_vprint(ANDROID_LOG_DEBUG, <span style="color:#e6db74">&#34;ffmpeg&#34;</span>, fmt, vl);
    }
}

<span style="color:#66d9ef">extern</span> <span style="color:#e6db74">&#34;C&#34;</span> JNIEXPORT jstring JNICALL
Java_top_kikt_ffmpeg_1sdl_1example_MainActivity_stringFromJNI(
        JNIEnv <span style="color:#f92672">*</span>env,
        jobject <span style="color:#75715e">/* this */</span>) {
    std<span style="color:#f92672">::</span>string hello <span style="color:#f92672">=</span> <span style="color:#e6db74">&#34;Hello from C++&#34;</span>;
    <span style="color:#66d9ef">return</span> env<span style="color:#f92672">-&gt;</span>NewStringUTF(hello.c_str());
}

<span style="color:#66d9ef">extern</span> <span style="color:#e6db74">&#34;C&#34;</span>
JNIEXPORT <span style="color:#66d9ef">void</span> JNICALL
Java_top_kikt_ffmpeg_1sdl_1example_FFmpeg_dumpInfo(JNIEnv <span style="color:#f92672">*</span>env, jclass clazz, jstring url) { <span style="color:#75715e">// 这个是映射的Java native方法, 具体的含义可以用搜索引擎搜javah相关的东西, 这里就不细说了
</span><span style="color:#75715e"></span>    av_log_set_callback(logToAndroid);
    AVFormatContext <span style="color:#f92672">*</span>context <span style="color:#f92672">=</span> <span style="color:#66d9ef">nullptr</span>;

    <span style="color:#66d9ef">const</span> <span style="color:#66d9ef">char</span> <span style="color:#f92672">*</span>cUrl <span style="color:#f92672">=</span> (<span style="color:#f92672">*</span>env).GetStringUTFChars(url, <span style="color:#66d9ef">nullptr</span>);

    avformat_open_input(<span style="color:#f92672">&amp;</span>context, cUrl, <span style="color:#66d9ef">nullptr</span>, <span style="color:#66d9ef">nullptr</span>);

    av_dump_format(context, <span style="color:#f92672">-</span><span style="color:#ae81ff">1</span>, cUrl, <span style="color:#ae81ff">0</span>);

    <span style="color:#66d9ef">if</span> (context) {
        avformat_close_input(<span style="color:#f92672">&amp;</span>context);
    }
}
</code></pre></div><div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#f92672">package</span> top.kikt.ffmpeg_sdl_example<span style="color:#f92672">;</span>

<span style="color:#66d9ef">public</span> <span style="color:#66d9ef">class</span> <span style="color:#a6e22e">FFmpeg</span> <span style="color:#f92672">{</span>

    <span style="color:#66d9ef">static</span> <span style="color:#f92672">{</span>
        System<span style="color:#f92672">.</span><span style="color:#a6e22e">loadLibrary</span><span style="color:#f92672">(</span><span style="color:#e6db74">&#34;ffmpeg-bridge&#34;</span><span style="color:#f92672">);</span> <span style="color:#75715e">// 引入so库, 至于其他的库, 因为在cmake里配置link了, 我实测不需要单独引入
</span><span style="color:#75715e"></span>    <span style="color:#f92672">}</span>

    <span style="color:#66d9ef">public</span> <span style="color:#66d9ef">static</span> <span style="color:#66d9ef">native</span> <span style="color:#66d9ef">void</span> <span style="color:#a6e22e">dumpInfo</span><span style="color:#f92672">(</span>String url<span style="color:#f92672">);</span> <span style="color:#75715e">// 映射到ffmpeg-bridge中的对应方法
</span><span style="color:#75715e"></span>
<span style="color:#f92672">}</span>
</code></pre></div><p>接着在项目里调用就可以像是调用 ffmpeg 中的 <code>av_dump_format</code> 方法一样了</p>
<p>这里还要说明一下, 在 c/cpp 端还有一种是用函数指针的方式来映射方法, 可以<a href="https://github.com/bilibili/ijkplayer/blob/cced91e3ae3730f5c63f3605b00d25eafcf5b97b/ijkmedia/ijkplayer/android/ijkplayer_jni.c#L1136-L1214">参考 <code>ijkplayer</code> 中的 <code>ijkplayer_jni.c</code></a></p>
<p>这种方法在方法声明时不需要遵循那个<code>包名_类名_方法名</code>的命名方式, 但是需要定义一些其他的东西, 这个可以百度搜索一下具体的定义规则, 这里就顺便说一下而已</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-kotlin" data-lang="kotlin"><span style="color:#66d9ef">package</span> top.kikt.ffmpeg_sdl_example

<span style="color:#66d9ef">import</span> android.os.Bundle
<span style="color:#66d9ef">import</span> android.util.Log
<span style="color:#66d9ef">import</span> androidx.appcompat.app.AppCompatActivity
<span style="color:#66d9ef">import</span> kotlinx.android.synthetic.main.activity_main.*
<span style="color:#66d9ef">import</span> java.io.File

<span style="color:#66d9ef">class</span> <span style="color:#a6e22e">MainActivity</span> : AppCompatActivity() {

    <span style="color:#66d9ef">override</span> <span style="color:#66d9ef">fun</span> <span style="color:#a6e22e">onCreate</span>(savedInstanceState: Bundle?) {
        <span style="color:#66d9ef">super</span>.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        sample_button.setOnClickListener {
            FFmpeg.dumpInfo(<span style="color:#e6db74">&#34;http://media.w3.org/2010/05/sintel/trailer.mp4&#34;</span>) <span style="color:#75715e">// 这里因为没有在异步线程调用, 所以会卡UI, 忽略即可😁
</span><span style="color:#75715e"></span>        }

    }
}
</code></pre></div><p>这个也很简单, 就是 dump 一个信息, xml 可以看项目源码</p>
<p>demo 里用的是另一个方法, 就是抽取视频的首帧, 转为 jpg 格式, 存在文件里</p>
<p>然后我发现了, 我找了网上的 5 个视频来做这个尝试, 只有一个视频首帧不是黑屏
真不知道播放器的库里 issue 为啥一个个都要求用首帧来做封面, 然后吧解释过自己传一个好看的封面才是正道也不听, 还自认为是刚需</p>
<h2 id="后记">后记</h2>
<p>因为偷懒, 提取首帧为 jpeg 图片的 so 库只有 x86 有, 也就是仅支持模拟器端, 其他的 cpu 类型没加 mjpeg 的编码器和封装器</p>
<p><a href="https://github.com/CaiJingLong/android_compile_ffmpeg4_example.git">https://github.com/CaiJingLong/android_compile_ffmpeg4_example.git</a></p>
<p>现在还没做 OpenSSL 关联, 所以 https tls 之类的都没法用</p>
<p>以上</p>

                        </div>

                        

<div class="post-archive">
    <h2>See Also</h2>
    <ul class="listing">
        
        <li><a href="/posts/android/android-include-ffmpeg/">android 引入ffmpeg</a></li>
        
        <li><a href="/posts/android/android-ffmpeg-compile-so/">ndk编译ffmpeg</a></li>
        
        <li><a href="/posts/flutter/exists/android-as-aar-to-maven/">把flutter项目作为aar添加到已有的Android工程上</a></li>
        
        <li><a href="/posts/android/android-q/privacy/android-q-privacy-5/">Android Q 隐私篇(5) - 相机/网络</a></li>
        
        <li><a href="/posts/android/android-q/privacy/android-q-privacy-4/">Android Q 隐私篇(4) - 唯一标识符, 剪切板数据</a></li>
        
    </ul>
</div>


                        <div class="post-meta meta-tags">
                            
                            <ul class="clearfix">
                                
                                <li><a href="http://www.kikt.top/tags/ffmpeg">ffmpeg</a></li>
                                
                                <li><a href="http://www.kikt.top/tags/android">android</a></li>
                                
                                <li><a href="http://www.kikt.top/tags/ndk">ndk</a></li>
                                
                            </ul>
                            
                        </div>
                    </article>
                    
    

    
    
    <div class="post bg-white">
      <script src="https://utteranc.es/client.js"
            repo= "caijinglong/kikt-blog-comment"
            issue-term="pathname"
            theme="github-light"
            crossorigin="anonymous"
            async>
      </script>
    </div>
    
                </div>
            </div>
            <div id="secondary">
    <section class="widget">
        <form id="search" action="//www.google.com/search" method="get" accept-charset="utf-8" target="_blank" _lpchecked="1">
      
      <input type="text" name="q" maxlength="20" placeholder="Search">
      <input type="hidden" name="sitesearch" value="http://www.kikt.top">
      <button type="submit" class="submit icon-search"></button>
</form>
    </section>
    
    <section class="widget">
        <h3 class="widget-title">最近文章</h3>
<ul class="widget-list">
    
    <li>
        <a href="http://www.kikt.top/posts/java/crack/crack1/" title="使用javassist,修改jar包方法实现">使用javassist,修改jar包方法实现</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/github/actions/create/" title="Github action 的开发到发布">Github action 的开发到发布</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/jenkins&#43;fastlane/" title="flutter Jenkins&#43;fastlane 自动化打测试包, 并上传蒲公英">flutter Jenkins&#43;fastlane 自动化打测试包, 并上传蒲公英</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/go/compile-for-android/" title="编译 go 源码为 android 动态库(so)">编译 go 源码为 android 动态库(so)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/focusnode-2/" title="Flutter FocusNode 焦点那点事-(二)">Flutter FocusNode 焦点那点事-(二)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/focusnode-1/" title="Flutter FocusNode 焦点那点事-(一)">Flutter FocusNode 焦点那点事-(一)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/server/caddy/cros_for_local_dev/" title="用 Caddy 解决 web 开发中本地跨域的问题">用 Caddy 解决 web 开发中本地跨域的问题</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/route/navigator-helper2/" title="Navigator Helper2">Navigator Helper2</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/grey-app/" title="flutter 怎么实现app整体灰度">flutter 怎么实现app整体灰度</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/posts/flutter/plugin/flutter-sdk-import-aar/" title="Flutter 插件开发之引入aar到安卓部分 并使用本地maven">Flutter 插件开发之引入aar到安卓部分 并使用本地maven</a>
    </li>
    
</ul>
    </section>

    

    <section class="widget">
        <h3 class="widget-title">分类</h3>
<ul class="widget-list">
    
    <li>
        <a href="http://www.kikt.top/categories/android/">android(25)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/caddy/">caddy(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/dart/">dart(5)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/docker/">docker(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/flutter/">flutter(60)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/github/">github(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/go/">go(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/golang/">golang(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/iOS/">iOS(6)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/ios/">ios(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/java/">java(6)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/jetbrains/">jetbrains(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/other/">other(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/python/">python(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/server/">server(5)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/spring/">spring(3)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/tools/">tools(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/%E6%9D%82%E9%A1%B9/">杂项(1)</a>
    </li>
    
    <li>
        <a href="http://www.kikt.top/categories/%E6%B6%82%E9%B8%A6/">涂鸦(1)</a>
    </li>
    
</ul>
    </section>

    <section class="widget">
        <h3 class="widget-title">标签</h3>
<div class="tagcloud">
    
    <a href="http://www.kikt.top/tags/10/">10</a>
    
    <a href="http://www.kikt.top/tags/2.3/">2.3</a>
    
    <a href="http://www.kikt.top/tags/Clipboard/">Clipboard</a>
    
    <a href="http://www.kikt.top/tags/Javassist/">Javassist</a>
    
    <a href="http://www.kikt.top/tags/Migrate/">Migrate</a>
    
    <a href="http://www.kikt.top/tags/aar/">aar</a>
    
    <a href="http://www.kikt.top/tags/actions/">actions</a>
    
    <a href="http://www.kikt.top/tags/aidl/">aidl</a>
    
    <a href="http://www.kikt.top/tags/android/">android</a>
    
    <a href="http://www.kikt.top/tags/androidQ/">androidQ</a>
    
    <a href="http://www.kikt.top/tags/androidX/">androidX</a>
    
    <a href="http://www.kikt.top/tags/apk/">apk</a>
    
    <a href="http://www.kikt.top/tags/app/">app</a>
    
    <a href="http://www.kikt.top/tags/appcode/">appcode</a>
    
    <a href="http://www.kikt.top/tags/azure/">azure</a>
    
    <a href="http://www.kikt.top/tags/ble/">ble</a>
    
    <a href="http://www.kikt.top/tags/bottomsheet/">bottomsheet</a>
    
    <a href="http://www.kikt.top/tags/butterknife/">butterknife</a>
    
    <a href="http://www.kikt.top/tags/c/">c</a>
    
    <a href="http://www.kikt.top/tags/caddy/">caddy</a>
    
    <a href="http://www.kikt.top/tags/camera/">camera</a>
    
    <a href="http://www.kikt.top/tags/cameraX/">cameraX</a>
    
    <a href="http://www.kikt.top/tags/channel/">channel</a>
    
    <a href="http://www.kikt.top/tags/cocoapods/">cocoapods</a>
    
    <a href="http://www.kikt.top/tags/cupertino/">cupertino</a>
    
    <a href="http://www.kikt.top/tags/dart/">dart</a>
    
    <a href="http://www.kikt.top/tags/dart-2.6/">dart-2.6</a>
    
    <a href="http://www.kikt.top/tags/desktop/">desktop</a>
    
    <a href="http://www.kikt.top/tags/dialog/">dialog</a>
    
    <a href="http://www.kikt.top/tags/dmg/">dmg</a>
    
    <a href="http://www.kikt.top/tags/doc/">doc</a>
    
    <a href="http://www.kikt.top/tags/docker/">docker</a>
    
    <a href="http://www.kikt.top/tags/docker-compose/">docker-compose</a>
    
    <a href="http://www.kikt.top/tags/excel/">excel</a>
    
    <a href="http://www.kikt.top/tags/exists/">exists</a>
    
    <a href="http://www.kikt.top/tags/faq/">faq</a>
    
    <a href="http://www.kikt.top/tags/fastlane/">fastlane</a>
    
    <a href="http://www.kikt.top/tags/ffi/">ffi</a>
    
    <a href="http://www.kikt.top/tags/ffmpeg/">ffmpeg</a>
    
    <a href="http://www.kikt.top/tags/flexmark/">flexmark</a>
    
    <a href="http://www.kikt.top/tags/flutter/">flutter</a>
    
    <a href="http://www.kikt.top/tags/flutter-web/">flutter-web</a>
    
    <a href="http://www.kikt.top/tags/focus/">focus</a>
    
    <a href="http://www.kikt.top/tags/focusNode/">focusNode</a>
    
    <a href="http://www.kikt.top/tags/form/">form</a>
    
    <a href="http://www.kikt.top/tags/framework/">framework</a>
    
    <a href="http://www.kikt.top/tags/github/">github</a>
    
    <a href="http://www.kikt.top/tags/go/">go</a>
    
    <a href="http://www.kikt.top/tags/golang/">golang</a>
    
    <a href="http://www.kikt.top/tags/gradle/">gradle</a>
    
    <a href="http://www.kikt.top/tags/http/">http</a>
    
    <a href="http://www.kikt.top/tags/iOS/">iOS</a>
    
    <a href="http://www.kikt.top/tags/ide/">ide</a>
    
    <a href="http://www.kikt.top/tags/idea/">idea</a>
    
    <a href="http://www.kikt.top/tags/index/">index</a>
    
    <a href="http://www.kikt.top/tags/inside/">inside</a>
    
    <a href="http://www.kikt.top/tags/ios/">ios</a>
    
    <a href="http://www.kikt.top/tags/java/">java</a>
    
    <a href="http://www.kikt.top/tags/jenkins/">jenkins</a>
    
    <a href="http://www.kikt.top/tags/jetbrains/">jetbrains</a>
    
    <a href="http://www.kikt.top/tags/jsdelivr/">jsdelivr</a>
    
    <a href="http://www.kikt.top/tags/json/">json</a>
    
    <a href="http://www.kikt.top/tags/json_serializable/">json_serializable</a>
    
    <a href="http://www.kikt.top/tags/junit/">junit</a>
    
    <a href="http://www.kikt.top/tags/library/">library</a>
    
    <a href="http://www.kikt.top/tags/live-template/">live-template</a>
    
    <a href="http://www.kikt.top/tags/loadmore/">loadmore</a>
    
    <a href="http://www.kikt.top/tags/log/">log</a>
    
    <a href="http://www.kikt.top/tags/mac/">mac</a>
    
    <a href="http://www.kikt.top/tags/macos/">macos</a>
    
    <a href="http://www.kikt.top/tags/maven/">maven</a>
    
    <a href="http://www.kikt.top/tags/mysql/">mysql</a>
    
    <a href="http://www.kikt.top/tags/navigationbar/">navigationbar</a>
    
    <a href="http://www.kikt.top/tags/navigator/">navigator</a>
    
    <a href="http://www.kikt.top/tags/ndk/">ndk</a>
    
    <a href="http://www.kikt.top/tags/nginx/">nginx</a>
    
    <a href="http://www.kikt.top/tags/oc/">oc</a>
    
    <a href="http://www.kikt.top/tags/opencv/">opencv</a>
    
    <a href="http://www.kikt.top/tags/poi/">poi</a>
    
    <a href="http://www.kikt.top/tags/pub/">pub</a>
    
    <a href="http://www.kikt.top/tags/python/">python</a>
    
    <a href="http://www.kikt.top/tags/retrofit/">retrofit</a>
    
    <a href="http://www.kikt.top/tags/route/">route</a>
    
    <a href="http://www.kikt.top/tags/server/">server</a>
    
    <a href="http://www.kikt.top/tags/so/">so</a>
    
    <a href="http://www.kikt.top/tags/spp/">spp</a>
    
    <a href="http://www.kikt.top/tags/sprintboot/">sprintboot</a>
    
    <a href="http://www.kikt.top/tags/swift/">swift</a>
    
    <a href="http://www.kikt.top/tags/tap/">tap</a>
    
    <a href="http://www.kikt.top/tags/thymeleaf/">thymeleaf</a>
    
    <a href="http://www.kikt.top/tags/tips/">tips</a>
    
    <a href="http://www.kikt.top/tags/toast/">toast</a>
    
    <a href="http://www.kikt.top/tags/transition/">transition</a>
    
    <a href="http://www.kikt.top/tags/ui/">ui</a>
    
    <a href="http://www.kikt.top/tags/utf8/">utf8</a>
    
    <a href="http://www.kikt.top/tags/yield/">yield</a>
    
    <a href="http://www.kikt.top/tags/%E4%BA%8C%E8%BF%9B%E5%88%B6/">二进制</a>
    
    <a href="http://www.kikt.top/tags/%E4%BA%A4%E5%8F%89/">交叉</a>
    
    <a href="http://www.kikt.top/tags/%E4%BA%A4%E5%8F%89%E7%BC%96%E8%AF%91/">交叉编译</a>
    
    <a href="http://www.kikt.top/tags/%E4%BB%8B%E7%BB%8D/">介绍</a>
    
    <a href="http://www.kikt.top/tags/%E4%BB%A3%E7%A0%81%E8%A7%84%E8%8C%83/">代码规范</a>
    
    <a href="http://www.kikt.top/tags/%E5%86%B2%E7%AA%81/">冲突</a>
    
    <a href="http://www.kikt.top/tags/%E5%8A%A8%E6%80%81/">动态</a>
    
    <a href="http://www.kikt.top/tags/%E5%8F%91%E5%B8%83/">发布</a>
    
    <a href="http://www.kikt.top/tags/%E5%8F%AF%E6%89%A7%E8%A1%8C/">可执行</a>
    
    <a href="http://www.kikt.top/tags/%E5%9B%BE%E5%BA%8A/">图床</a>
    
    <a href="http://www.kikt.top/tags/%E5%9F%8E%E5%B8%82/">城市</a>
    
    <a href="http://www.kikt.top/tags/%E5%A4%A7%E6%96%87%E4%BB%B6/">大文件</a>
    
    <a href="http://www.kikt.top/tags/%E5%B7%A5%E5%85%B7/">工具</a>
    
    <a href="http://www.kikt.top/tags/%E5%B7%B2%E6%9C%89%E9%A1%B9%E7%9B%AE/">已有项目</a>
    
    <a href="http://www.kikt.top/tags/%E5%BC%80%E5%8F%91%E7%8E%AF%E5%A2%83/">开发环境</a>
    
    <a href="http://www.kikt.top/tags/%E6%80%BB%E7%BB%93/">总结</a>
    
    <a href="http://www.kikt.top/tags/%E6%85%A2/">慢</a>
    
    <a href="http://www.kikt.top/tags/%E6%89%93%E5%8C%85/">打包</a>
    
    <a href="http://www.kikt.top/tags/%E6%89%AB%E7%A0%81/">扫码</a>
    
    <a href="http://www.kikt.top/tags/%E6%8F%92%E4%BB%B6/">插件</a>
    
    <a href="http://www.kikt.top/tags/%E6%96%87%E6%A1%A3/">文档</a>
    
    <a href="http://www.kikt.top/tags/%E6%A8%A1%E6%9D%BF/">模板</a>
    
    <a href="http://www.kikt.top/tags/%E6%B8%B2%E6%9F%93/">渲染</a>
    
    <a href="http://www.kikt.top/tags/%E6%BA%90%E7%A0%81%E8%A7%A3%E6%9E%90/">源码解析</a>
    
    <a href="http://www.kikt.top/tags/%E7%81%B0%E5%BA%A6/">灰度</a>
    
    <a href="http://www.kikt.top/tags/%E7%82%B9%E5%87%BB/">点击</a>
    
    <a href="http://www.kikt.top/tags/%E7%84%A6%E7%82%B9/">焦点</a>
    
    <a href="http://www.kikt.top/tags/%E7%88%AC%E8%99%AB/">爬虫</a>
    
    <a href="http://www.kikt.top/tags/%E7%8A%B6%E6%80%81%E7%AE%A1%E7%90%86/">状态管理</a>
    
    <a href="http://www.kikt.top/tags/%E7%99%BE%E5%BA%A6%E5%9C%B0%E5%9B%BE/">百度地图</a>
    
    <a href="http://www.kikt.top/tags/%E7%BC%96%E7%A0%81/">编码</a>
    
    <a href="http://www.kikt.top/tags/%E7%BC%96%E7%A8%8B%E6%8A%80%E5%B7%A7/">编程技巧</a>
    
    <a href="http://www.kikt.top/tags/%E7%BC%96%E8%AF%91/">编译</a>
    
    <a href="http://www.kikt.top/tags/%E7%BF%BB%E8%AF%91/">翻译</a>
    
    <a href="http://www.kikt.top/tags/%E8%93%9D%E7%89%99/">蓝牙</a>
    
    <a href="http://www.kikt.top/tags/%E8%A1%A8%E5%8D%95/">表单</a>
    
    <a href="http://www.kikt.top/tags/%E8%B7%AF%E7%94%B1/">路由</a>
    
    <a href="http://www.kikt.top/tags/%E8%BF%87%E5%9C%BA%E5%8A%A8%E7%94%BB/">过场动画</a>
    
    <a href="http://www.kikt.top/tags/%E9%9A%90%E7%A7%81/">隐私</a>
    
</div>
    </section>

    
<section class="widget">
    <h3 class="widget-title">友情链接</h3>
    <ul class="widget-list">
        
        <li>
            <a target="_blank" href="https://github.com/Caijinglong" title="我的Github">我的Github</a>
        </li>
        
        <li>
            <a target="_blank" href="https://flutter.dev" title="flutter 官网">flutter 官网</a>
        </li>
        
    </ul>
</section>


    <section class="widget">
        <h3 class="widget-title">其它</h3>
        <ul class="widget-list">
            <li><a href="http://www.kikt.top/index.xml">文章 RSS</a></li>
        </ul>
    </section>
</div>
        </div>
    </div>
</div>
<footer id="footer">
    <div class="container">
        <div>
            <p>如果我的blog对您有帮助,而您愿意捐赠 😆, 可以用下面的二维码</p>
            <img style="width:5rem;" src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&resolveLfs=true&%24format=octetStream&api-version=5.0&path=%2F20190424141834.png"/>
            <img style="width:5rem; padding-left: 2rem;" 
            src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&resolveLfs=true&%24format=octetStream&api-version=5.0&path=%2F20190424141931.png"/>
            <img style="width:5rem; padding-left: 2rem;" 
            src="https://dev.azure.com/cjlspy/844861b8-ee45-48a3-b430-b974684baaaa/_apis/git/repositories/bf4da1c1-1cfa-4f54-8a75-745cce2b737c/items?versionDescriptor%5Bversion%5D=master&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&resolveLfs=true&%24format=octetStream&api-version=5.0&path=%2F20190424142013.png"/>
        </div>
        &copy; 2018 <a href="http://www.kikt.top">caijinglong的博客 By caijinglong</a>.
        Powered by <a rel="nofollow noreferer noopener" href="https://gohugo.io" target="_blank">Hugo</a>.
        <a href="http://www.flysnow.org/" target="_blank">Theme</a> based on <a href="https://github.com/rujews/maupassant-hugo" target="_blank">maupassant</a>.<br/>
        本站所有内容基于<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh" style="color:coral">CC4.0</a>协议发布,需要转载必须署名
        <br/>
        如果有问题可以<a href="mailto:cjl_spy@163.com">email联系我</a>
        <br/>
        京ICP备18038473号-1
        
    </div>
</footer>


    <script type="text/javascript" src="/js/prism.js" async="true"></script>
    <script type="text/javascript">
    
    (function(){
        $("pre code").parent().addClass("line-numbers")
    }())

    window.MathJax = {
        tex2jax: {
            inlineMath: [ ['$','$'] ],
            processEscapes: true
        }
    };
    </script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script>

<a id="rocket" href="#top"></a>
<script type="text/javascript" src="/js/totop.js?v=0.0.0" async=""></script>



<script type="text/javascript" src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" async></script>




</body>
</html>
